<template>
	<view class="user-space-userinfo">
		<view class="user-space-userinfo-item">
			<view class="title">账号信息</view>
			<view class="">糗龄: {{getRegAge}}</view>
			<view class="">糗百ID: {{userinfo.id}}</view>
		</view>
		<view class="user-space-userinfo-item">
			<view class="title">个人信息</view>
			<view class="">星座: {{getXingZuo}}</view>
			<view class="">职业: {{userinfo.zy}}</view>
			<view class="">故乡: {{userinfo.pickerText}}</view>
			<view class="">情感状态: {{userinfo.qg}}</view>
		</view>
	</view>
</template>

<script>
	import time from '../../common/time.js'
	export default {
		props:{
			userinfo:Object
		},
		computed:{
			// 获取糗龄
			getRegAge(){
				return time.gettime.sumAge(this.userinfo.regTime)
			},
			// 获取星座
			getXingZuo(){
				return time.gettime.getHoroscope(this.userinfo.birthday)
			}
		},
	}
</script>

<style>
	.user-space-userinfo{
		padding: 0 30upx;
	}
	.user-space-userinfo-item{
		padding: 20upx 0;
		border-bottom: 1upx solid #EEEEEE;
	}
	.user-space-userinfo-item > view {
		color:#AAAAAA;
	}
	.user-space-userinfo-item > view:first-child {
		color:#333333;
		padding: 10upx 0;
		font-size: 32upx;
	}
</style>
